// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.

import Antd from 'ant-design-vue'//antd引入
import router from './router'//路由
// import router from './router/active'//路由

import 'ant-design-vue/dist/antd.css'//样式
import App from './App'
import store from './store'
import filters from './filter.js' //filters 引入
// import VueI18n from 'vue-i18n'//语言包
import base from './assets/js/base.js' //全局函数引入

Vue.config.productionTip = false

Vue.use(Antd)
Vue.use(base)
// Vue.use(VueI18n)
//全局注册store
Vue.prototype.$store=store;
//过滤器
for(let key in filters){
  Vue.filter(key,filters[key]);
}
//全局注册自定义指令  v-focus
Vue.directive('focus',{
	//当绑定的元素插入dom
	inserted : function(el){
		//让原生input框聚焦
		el.querySelector('input').focus()
		// console.log(el)
		//这里要注意的是组件<el-input>本身在页面中渲染成了一个div元素
		// el.querySelector('input').focus()
	}
})
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
